Repository navigation
feat(catalog): read catalog v4 and show only apps for the current platform - #84
Merged
Merged
Conversation
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Closes #83
Requires egdev6/nexo-catalog#11 (publishes
v4/catalog.json) to be merged and deployed before Nexo 0.2.0 ships.Type of change
type:bugtype:featuretype:docstype:refactortype:breaking-changetype:choretype:testSummary
Nexo 0.2.0 reads only catalog v4 (
https://egdev6.github.io/nexo-catalog/v4/catalog.json), where each app declares one entry per platform. The hub resolves its own platform key at runtime (windows-x86_64,darwin-aarch64, …) and shows only the apps that have an entry for it. Apps without one are hidden everywhere: catalog, Mis apps, Novedades and update checks. Today every app is Windows-only, so on Windows nothing visible changes.Changes
crates/nexo-catalogparse_catalog_v4validates the v4 wire format, reusing the existing domain checks per entry: release-asset URLs, updater key, semver, dates, detection.project_catalog_v4turns a v4 document plus a platform key into the existing flat catalog (schemaVersion: 4), so consumers stay unchanged. The schema copy is synced with nexo-catalog.fixtures/v4.jsonandfixtures/parity-v4.json(validity cases plus the expected projection per platform), run by both the Rust and the TS test suites.platform_keycommand (OS/ARCH → Tauri updater key). The install feed fetches only v4 and projects it before selection. There is a single v4 cache (read_catalog_v4_cache);write_catalog_cacheaccepts only valid v4. Theread_catalog_cache,read_catalog_v2_cacheandread_catalog_v3_cachecommands and the v1/v2/v3 fallback chain are removed.parseCatalogV4/projectCatalogV4. The loader uses only the v4 endpoint and cache and projects withplatform_key.schemaVersion === 3gates now accept v4. The i18n keyinstall.v3Requiredis renamed toinstall.catalogUpdateRequired.docs/catalog.mddescribes v4.catalog.json,v2/andv3/stay published for Nexo 0.1.x.Test evidence
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings: clean.cargo test --workspace: 336 passed, including the 4 v4 parity tests.apps/hub:npx vitest run(47 files, 612 tests),npx tsc --noEmit,npm run buildandnpm run ds:doctor: all pass.windows-x86_64and nothing fordarwin-aarch64.#[cfg(windows)]code (apps.rsofficial_catalog, the Windowsinvoke_handlerregistration inlib.rs). The WSL host has no MSVClib.exe. The native Windows CI jobs on this PR are the proof.Risks and follow-ups
_x64-setup.exe, and this rule stays at selection time: one bad entry cannot reject the whole catalog.darwin-*andlinux-*entries are display-only.v3/catalog.jsonandv4/catalog.jsonin nexo-catalog.Review notes
crates/nexo-catalog/src/lib.rs(v4 rules and projection),install_feed.rsandcatalog_cache.rs(fetch and cache boundaries),apps/hub/src/catalog/format.tsandloader.ts.AI assistance
The el Gentleman harness on Pi drafted this change: contract, shared corpus, Rust and TS implementation via workers, and an independent verifier pass. The maintainer reviews it and carries responsibility for the final decision.